<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>

<body>
<script>


var s ="<html><head><title></title></head><body></body></html>";
var r = /(<.*>)(<.*>)/
var a = s.match(r);
alert(a[1]);	// 左侧匹配"<html><head><title></title></head><body></body>"
alert(a[2]); 	//右侧子表达式匹配"</html>"


</script>
</body>
</html>
